<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>资产负债</title>
<jsp:include page="../../import.jsp" flush="true" />
    <style type="text/css">
        .field button {
            height: 18px;
            font-size: 10px;
        }
    </style>
</head>
<body class="iframeBody">
<div class="Wrapper">
    <div class="pageIn2layout">
        <div class="pageIn2L_side">
            <div class="sqPanel">
                <div class="sqPanel_head"></div>
                <div class="sqPanel_body">
                    <ul class="links">
                        <li id="inNav_01" data-src="<%=path%>/customer/cstbscinfo/toFilFinanceDebtDetailPage.do?cstId=${cstId}">资产负债表</li>
                        <li id="inNav_02" data-src="<%=path%>/customer/filFinancePro/toFilFinanceProDetailPage.do?cstId=${cstId}">利润及利润分配表</li>
                        <li id="inNav_03" data-src="<%=path%>/customer/filFinanceCash/toFilFinanceCashDetailPage.do?cstId=${cstId}">现金流量表</li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="pageIn2L_mid">
                <input name="cstId" id="cstId" type="text" style="display: none;" value="${cstId}"/>
            <form id="formSet">
                <div class="fieldset2 clearFix">
                    <div class="caption">
                        <span class="title">报表信息</span>
                    </div>
                    <div class="table table_full">
                        <div class="table_cell labels" style="width: 300px;">
                            <div class="label_item">报表年份</div>
                            <div class="label_item">报表类型</div>
                            <div class="label_item">报表类型细分</div>
                            <div class="label_item">审计事务所名称</div>
                            <div class="label_item">审计人员名称</div>
                            <div class="label_item">审计时间</div>
                        </div>
                        <div class="table_cell fields formdiva">
                            <div class="field_item"><input name="belongDate" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item">
                                <select name="reporttype" data-value=" " >
                                    <option value="  " selected="selected">--请选择--</option>
                                    <c:forEach items="${reportTypeList}" var="opt">
                                        <option value="${opt.key}">${opt.value}</option>
                                    </c:forEach>
                                </select>
                                
                            </div>
                            <div class="field_item">
                                <select name="reportsubtype" data-value=" " >
                                    <option value="  " selected="selected">--请选择--</option>
                                    <c:forEach items="${reportsubTypeList}" var="opt">
                                        <option value="${opt.key}">${opt.value}</option>
                                    </c:forEach>
                                </select>
                                
                            </div>
                            <div class="field_item"><input name="auditinstitute" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="auditstaff" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="auditime" type="text" class="ui-textbox" value="" /></div>
                        </div>
                        <div class="table_cell fields formdivb">
                            <div class="field_item"><input name="belongDate" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item">
                                <select name="reporttype" data-value=" " >
                                    <option value="  " selected="selected">--请选择--</option>
                                    <c:forEach items="${reportTypeList}" var="opt">
                                        <option value="${opt.key}">${opt.value}</option>
                                    </c:forEach>
                                </select>
                                
                            </div>
                            <div class="field_item">
                                <select name="reportsubtype" data-value=" " >
                                    <option value="  " selected="selected">--请选择--</option>
                                    <c:forEach items="${reportsubTypeList}" var="opt">
                                        <option value="${opt.key}">${opt.value}</option>
                                    </c:forEach>
                                </select>
                                
                            </div>
                            <div class="field_item"><input name="auditinstitute" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="auditstaff" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="auditime" type="text" class="ui-textbox" value="" /></div>
                        </div>
                    </div>
                </div>
                <div class="fieldset2 clearFix">
                    <div class="caption">
                        <span class="title">流动资产</span>
                    </div>
                    <div class="table table_full">
                        <div class="table_cell labels" style="width: 300px;">
                            <div class="label_item">货币资金</div>
                            <div class="label_item">交易性金融资产</div>
                            <div class="label_item">应收票据</div>
                            <div class="label_item">应收帐款</div>
                            <div class="label_item">预付账款</div>
                            <div class="label_item">应收利息</div>
                            <div class="label_item">应收股利</div>
                            <div class="label_item">其他应收款</div>
                            <div class="label_item">存货</div>
                            <div class="label_item">一年内到期的非流动资产</div>
                            <div class="label_item">其他流动资产</div>
                            <div class="label_item">流动资产合计</div>
                            <div class="label_item">可供出售的金融资产</div>
                            <div class="label_item">持有至到期投资</div>
                            <div class="label_item">长期股权投资</div>
                            <div class="label_item">长期应收款</div>
                            <div class="label_item">投资性房地产</div>
                        </div>
                        <div class="table_cell fields formdiva">
                            <div class="field_item"><input name="currencyFunds" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="tradeFinanceAsset" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="accountsBills" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="accountsSection" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="prepaid" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="accountsInterest" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="accountsDivident" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="otherAccount" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="stock" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="inYearLongAsset" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="flowOtherAssets" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="flowAssetsTotal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="saleFinanceAsset" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="holdMatureInvest" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longOptionInvest" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longTermAccount" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="realEstateInvest" type="text" class="ui-textbox" value="" /></div>
                        </div>
                        <div class="table_cell fields formdivb">
                            <div class="field_item"><input name="currencyFunds" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="tradeFinanceAsset" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="accountsBills" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="accountsSection" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="prepaid" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="accountsInterest" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="accountsDivident" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="otherAccount" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="stock" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="inYearLongAsset" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="flowOtherAssets" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="flowAssetsTotal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="saleFinanceAsset" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="holdMatureInvest" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longOptionInvest" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longTermAccount" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="realEstateInvest" type="text" class="ui-textbox" value="" /></div>
                        </div>
                    </div>
                </div>
                <div class="fieldset2 clearFix">
                    <div class="caption">
                        <span class="title">固定资产</span>
                    </div>
                    <div class="table table_full">
                        <div class="table_cell labels" style="width: 300px;">
                            <div class="label_item">固定资产原值</div>
                            <div class="label_item">在建工程</div>
                            <div class="label_item">工程物资</div>
                            <div class="label_item">固定资产清理</div>
                            <div class="label_item">生产性生物资产</div>
                            <div class="label_item">油气资产</div>
                            <div class="label_item">无形资产</div>
                            <div class="label_item">开发支出</div>
                            <div class="label_item">商誉</div>
                            <div class="label_item">长期待摊费用</div>
                            <div class="label_item">递延所得税资产</div>
                            <div class="label_item">其他非流动资产</div>
                            <div class="label_item">非流动资产合计</div>
                            <div class="label_item">资产总计</div>
                        </div>
                        <div class="table_cell fields formdiva">
                            <div class="field_item"><input name="fixedAssentOriginal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="progressProject" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="projectSupplies" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="fixedClean" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="produceBiosAsset" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="oilGasAsset" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="invisibleNet" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="developExpend" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="goodwill" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longPrepaidFee" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="deferredTax" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="otherLongNet" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="nonflowAssetsTotal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="netTotal" type="text" class="ui-textbox" value="" /></div>
                        </div>
                        <div class="table_cell fields formdivb">
                            <div class="field_item"><input name="fixedAssentOriginal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="progressProject" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="projectSupplies" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="fixedClean" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="produceBiosAsset" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="oilGasAsset" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="invisibleNet" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="developExpend" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="goodwill" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longPrepaidFee" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="deferredTax" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="otherLongNet" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="nonflowAssetsTotal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="netTotal" type="text" class="ui-textbox" value="" /></div>
                        </div>
                    </div>
                </div>
                <div class="fieldset2 clearFix">
                    <div class="caption">
                        <span class="title">流动负债</span>
                    </div>
                    <div class="table table_full">
                        <div class="table_cell labels" style="width: 300px;">
                            <div class="label_item">短期借款</div>
                            <div class="label_item">交易性金融负债</div>
                            <div class="label_item">应付票据</div>
                            <div class="label_item">应付账款</div>
                            <div class="label_item">预收账款</div>
                            <div class="label_item">应付利息</div>
                            <div class="label_item">应付职工薪酬</div>
                            <div class="label_item">应交税费</div>
                            <div class="label_item">应付股利</div>
                            <div class="label_item">其他应付款</div>
                            <div class="label_item">一年内到期的非流动负债</div>
                            <div class="label_item">其他流动负债</div>
                            <div class="label_item">流动负债合计</div>
                            <div class="label_item">长期借款</div>

                            <div class="label_item">应付债券</div>
                            <div class="label_item">长期应付款</div>
                            <div class="label_item">专项应付款</div>
                            <div class="label_item">预计负债</div>
                            <div class="label_item">递延所得税负债</div>
                            <div class="label_item">其他非流动负债</div>
                            <div class="label_item">非流动负债合计</div>
                            <div class="label_item">负债合计</div>
                        </div>
                        <div class="table_cell fields formdiva">
                            <div class="field_item"><input name="shortLoan" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="tradeFinanceDabt" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeBills" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeSection" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="advance" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeInterest" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeWage" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="ldfzA" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeDividend" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="otherCopeSection" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="inYearLongDabt" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="ldfzD" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="flowDabtTotal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longLoan" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeBond" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longCopeSection" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="specialPayment" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="ldfzC" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="deferredTexItem" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="otherLongDabt" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longDabtTotal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="dabtTotal" type="text" class="ui-textbox" value="" /></div>
                        </div>
                        <div class="table_cell fields formdivb">
                            <div class="field_item"><input name="shortLoan" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="tradeFinanceDabt" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeBills" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeSection" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="advance" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeInterest" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeWage" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="ldfzA" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeDividend" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="otherCopeSection" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="inYearLongDabt" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="ldfzD" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="flowDabtTotal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longLoan" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="copeBond" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longCopeSection" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="specialPayment" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="ldfzC" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="deferredTexItem" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="otherLongDabt" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="longDabtTotal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="dabtTotal" type="text" class="ui-textbox" value="" /></div>
                        </div>
                    </div>
                </div>
                <div class="fieldset2 clearFix">
                    <div class="caption">
                        <span class="title">所有者权益</span>
                    </div>
                    <div class="table table_full">
                        <div class="table_cell labels" style="width: 300px;">
                            <div class="label_item">实收资本（或股本）</div>
                            <div class="label_item">资本公积</div>
                            <div class="label_item">减：库存股</div>
                            <div class="label_item">盈余公积</div>
                            <div class="label_item">未分配利润</div>
                            <div class="label_item">所有者权益合计</div>
                            <div class="label_item">负债及所有者权益合计</div>
                        </div>
                        <div class="table_cell fields formdiva">
                            <div class="field_item"><input name="paidCapital" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="capitalReserve" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="stockCapital" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="surplusReserve" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="notProfit" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="owerTotal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="dabtOwerTotal" type="text" class="ui-textbox" value="" /></div>
                        </div>
                        <div class="table_cell fields formdivb">
                            <div class="field_item"><input name="paidCapital" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="capitalReserve" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="stockCapital" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="surplusReserve" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="notProfit" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="owerTotal" type="text" class="ui-textbox" value="" /></div>
                            <div class="field_item"><input name="dabtOwerTotal" type="text" class="ui-textbox" value="" /></div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script type="text/javascript">
    $(function () {
        $('.pageIn2L_side .links').pageInSideLink({currentNav: 'inNav_01'});
        $("#formSet").ligerForm({
            validate: true
        });
        isSwitch(0);
        initFormData();
        SetIframe_height();
    });
    //是否启用输入选择框(1是，0否)
    function isSwitch(type){

        if(type==0){
            $('#formSet select').each(function(){
                var ligeruiid = $(this).attr('ligeruiid');
                liger.get(ligeruiid).setDisabled();
            });
            $('#formSet .ui-textbox').each(function(){
                var ligeruiid = $(this).attr('ligeruiid');
                liger.get(ligeruiid).setDisabled(true);
            });
        }else{
            $('#formSet select').each(function(){
                var ligeruiid = $(this).attr('ligeruiid');
                liger.get(ligeruiid).setEnabled();
            });
            $('#formSet .ui-textbox').each(function(){
                var ligeruiid = $(this).attr('ligeruiid');
                liger.get(ligeruiid).setEnabled(true);
            });
        }
    }
    //初始化数据
    function initFormData(){
        var _cstid=$("#cstId").val();
        if(!_cstid){
            return;
        }
        var _url = '<%=path%>/customer/filFinanceDebt/selectDebtList.do';
        AjaxUtils.ajaxGet(_url, {cstId:_cstid}, function(msg){
            if(msg.success == 1){
                setFormData(msg.data);//设置数据


            }else{
                UIUtils.alertError(msg.info);
            }
        }, false);
    }
    //赋值
    function setFormData(data){
        if(data != undefined && data !=null && data.length!=0){
            if(data[0] != undefined && data[0]!=null){
                var forma = data[0];
                var objKeys = Object.keys(forma);
                for(var i = 0; i<objKeys.length; i++){
                    if(objKeys[i] != 'id'){
                        var ligeruiid = $(".formdiva [name="+objKeys[i]+"]").attr('ligeruiid');
                        if(ligeruiid) {
                        liger.get(ligeruiid).setValue(forma[objKeys[i]]);
                        }
                    }
                }
            }
            if(data[1] != undefined && data[1]!=null){
                var formb = data[1];
                var objKeys = Object.keys(formb);
                for(var i = 0; i<objKeys.length; i++){
                    if(objKeys[i] != 'id') {
                        var ligeruiid = $(".formdivb [name="+objKeys[i]+"]").attr('ligeruiid');
                        if(ligeruiid) {
                            liger.get(ligeruiid).setValue(formb[objKeys[i]]);
                        }
                    }
                }
            }
        }
    }
</script>
</body>
</html>